package com.egame.manage.biz.server.pu;

import java.rmi.RemoteException;
import java.util.List;

import cn.egame.common.data.SqlUtils;
import cn.egame.common.exception.ExceptionCommonBase;
import cn.egame.common.util.Utils;
import cn.egame.interfaces.pu.AppParameter;


public class StoreSortServiceImpl {
	
	private static StoreSortServiceImpl instance = null;
	private static byte[] SyncRoot = new byte[1];
	private StoreSortServiceDao dao = null;
	
	public static StoreSortServiceImpl getInstance() throws ExceptionCommonBase {
		if (instance == null) {
			synchronized (SyncRoot) {
				if (instance == null) {
					instance = new StoreSortServiceImpl();
				}
			}
		}
		return instance;
	}
	
	public StoreSortServiceImpl() throws ExceptionCommonBase{
		super();
		dao = new StoreSortServiceDao();
	}
	
	public int deleteSort(int appId, long loginUserId, int activityId)throws ExceptionCommonBase{
		return dao.deleteSort(activityId);
	}
	
	public int upper(int appId, long loginUserId, int activityId) throws RemoteException {
		return dao.upper(appId, loginUserId, activityId);
	}
	
	public int lower(int appId, long loginUserId, int activityId) throws RemoteException {
		return dao.lower(appId, loginUserId, activityId);
	}
	
	public int getMaxSortNo(int parentId)throws RemoteException{
		return dao.getMaxSortNo(parentId);
	}
	
	public List<Integer> listTopicHistoryIdsByParentId(int appId,
			long loginUserId, int parentId) throws ExceptionCommonBase {
		return dao.topicHistoryIds(parentId);
	}
	
	public List<Integer> listAppParameterByBean(int appId, long loginUserId,AppParameter bean)throws RemoteException{		
		return dao.listAppParameterByBean(bean);
	}
}
